<?php
/**
*@package AConfig.app.php
*@copyright Copyright (c) 2012-2014 Tuniu.com
*@author huxiaomin 2012  上午11:42:16
*@version 1.0
*/

class AConfigApp{
	
	function hook($name){
	   if ($name == 'look'){
	       return array('ajax'=>1);
	   }
	}

	function index(){
		return array();
	}
	
	
	function look($request){
		$name = trim($request['name']);
    	$flag = 0;
    	$data = array();
    	$msg = '';
    	switch ($name){
    		case 'config.inc.php'://总配置文件
    			$flag = 1;
    			echo TT_DIR.'config.inc.php';
    			$msg = file_get_contents(TT_DIR.'config.inc.php');
    			break;
    		case 'table_config_cache'://查看表文件缓存
    			 $TTableMemcache = new TTableMemcache();
          		 $cache = $TTableMemcache->getConfig();
          		 $flag = 1;
          		 $msg = print_r($cache,1);
    			break;
    		case 'database'://总配置文件
    			$flag = 1;
    			parse_str(D_DAO,$dao);
    			$msg = print_r($dao,1);
    			break;
    		default:
    			 $msg = '禁止hack';
    			break;
    	
    	}
        return goutJson(1,$data,$msg,$request);
	
	}
}